package com.fisco.app.contract;

import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import org.fisco.bcos.sdk.v3.client.Client;
import org.fisco.bcos.sdk.v3.codec.datatypes.DynamicArray;
import org.fisco.bcos.sdk.v3.codec.datatypes.Event;
import org.fisco.bcos.sdk.v3.codec.datatypes.Function;
import org.fisco.bcos.sdk.v3.codec.datatypes.Type;
import org.fisco.bcos.sdk.v3.codec.datatypes.TypeReference;
import org.fisco.bcos.sdk.v3.codec.datatypes.Utf8String;
import org.fisco.bcos.sdk.v3.codec.datatypes.generated.Int256;
import org.fisco.bcos.sdk.v3.codec.datatypes.generated.tuples.generated.Tuple1;
import org.fisco.bcos.sdk.v3.codec.datatypes.generated.tuples.generated.Tuple3;
import org.fisco.bcos.sdk.v3.contract.Contract;
import org.fisco.bcos.sdk.v3.crypto.CryptoSuite;
import org.fisco.bcos.sdk.v3.crypto.keypair.CryptoKeyPair;
import org.fisco.bcos.sdk.v3.model.CryptoType;
import org.fisco.bcos.sdk.v3.model.TransactionReceipt;
import org.fisco.bcos.sdk.v3.model.callback.TransactionCallback;
import org.fisco.bcos.sdk.v3.transaction.model.exception.ContractException;

@SuppressWarnings("unchecked")
public class TestCRUDMultiParameter extends Contract {
    public static final String[] BINARY_ARRAY = {"608060405260405180606001604052806040518060400160405280600481526020017f6e616d650000000000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600381526020017f616765000000000000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600381526020017f74656c00000000000000000000000000000000000000000000000000000000008152508152506000906003620000d092919062000479565b50348015620000de57600080fd5b506060600267ffffffffffffffff81118015620000fa57600080fd5b506040519080825280602002602001820160405280156200013057816020015b60608152602001906001900390816200011a5790505b5090506040518060400160405280600381526020017f6167650000000000000000000000000000000000000000000000000000000000815250816000815181106200017757fe5b60200260200101819052506040518060400160405280600381526020017f74656c000000000000000000000000000000000000000000000000000000000081525081600181518110620001c657fe5b6020026020010181905250620001db620004e0565b60405180604001604052806040518060400160405280600481526020017f6e616d6500000000000000000000000000000000000000000000000000000000815250815260200183815250905061100273ffffffffffffffffffffffffffffffffffffffff166331a5a51e6040518060400160405280600c81526020017f706572736f6e5f6d756c74690000000000000000000000000000000000000000815250836040518363ffffffff1660e01b81526004016200029b92919062000873565b602060405180830381600087803b158015620002b657600080fd5b505af1158015620002cb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002f1919062000680565b50600061100273ffffffffffffffffffffffffffffffffffffffff1663f23f63c96040518060400160405280600c81526020017f706572736f6e5f6d756c746900000000000000000000000000000000000000008152506040518263ffffffff1660e01b81526004016200036691906200084f565b60206040518083038186803b1580156200037f57600080fd5b505afa15801562000394573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620003ba919062000654565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156200042f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200042690620008ae565b60405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050620009f2565b828054828255906000526020600020908101928215620004cd579160200282015b82811115620004cc578251829080519060200190620004bb929190620004fa565b50916020019190600101906200049a565b5b509050620004dc919062000581565b5090565b604051806040016040528060608152602001606081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200053d57805160ff19168380011785556200056e565b828001600101855582156200056e579182015b828111156200056d57825182559160200191906001019062000550565b5b5090506200057d9190620005b2565b5090565b620005af91905b80821115620005ab5760008181620005a19190620005da565b5060010162000588565b5090565b90565b620005d791905b80821115620005d3576000816000905550600101620005b9565b5090565b90565b50805460018160011615610100020316600290046000825580601f1062000602575062000623565b601f016020900490600052602060002090810190620006229190620005b2565b5b50565b6000815190506200063781620009be565b92915050565b6000815190506200064e81620009d8565b92915050565b6000602082840312156200066757600080fd5b6000620006778482850162000626565b91505092915050565b6000602082840312156200069357600080fd5b6000620006a3848285016200063d565b91505092915050565b6000620006ba838362000743565b905092915050565b6000620006cf82620008e0565b620006db818562000903565b935083602082028501620006ef85620008d0565b8060005b858110156200073157848403895281516200070f8582620006ac565b94506200071c83620008f6565b925060208a01995050600181019050620006f3565b50829750879550505050505092915050565b60006200075082620008eb565b6200075c818562000914565b93506200076e81856020860162000977565b6200077981620009ad565b840191505092915050565b60006200079182620008eb565b6200079d818562000925565b9350620007af81856020860162000977565b620007ba81620009ad565b840191505092915050565b6000620007d460138362000925565b91507f637265617465207461626c65206661696c6564000000000000000000000000006000830152602082019050919050565b6000604083016000830151848203600086015262000826828262000743565b91505060208301518482036020860152620008428282620006c2565b9150508091505092915050565b600060208201905081810360008301526200086b818462000784565b905092915050565b600060408201905081810360008301526200088f818562000784565b90508181036020830152620008a5818462000807565b90509392505050565b60006020820190508181036000830152620008c981620007c5565b9050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b6000620009438262000957565b9050919050565b60008160030b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60005b83811015620009975780820151818401526020810190506200097a565b83811115620009a7576000848401525b50505050565b6000601f19601f8301169050919050565b620009c98162000936565b8114620009d557600080fd5b50565b620009e3816200094a565b8114620009ef57600080fd5b50565b610f818062000a026000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80630bd765db14610051578063223c00891461008157806380599e4b146100b1578063fcd7e3c1146100e1575b600080fd5b61006b600480360381019061006691906109c1565b610113565b6040516100789190610cc8565b60405180910390f35b61009b600480360381019061009691906109c1565b610372565b6040516100a89190610cc8565b60405180910390f35b6100cb60048036038101906100c69190610a2b565b61055d565b6040516100d89190610cc8565b60405180910390f35b6100fb60048036038101906100f69190610a2b565b610652565b60405161010a93929190610d3c565b60405180910390f35b600060038251101561012457600080fd5b6060600267ffffffffffffffff8111801561013e57600080fd5b5060405190808252806020026020018201604052801561017857816020015b61016561076c565b81526020019060019003908161015d5790505b50905060405180604001604052806040518060400160405280600381526020017f61676500000000000000000000000000000000000000000000000000000000008152508152602001846001815181106101ce57fe5b6020026020010151815250816000815181106101e657fe5b602002602001018190525060405180604001604052806040518060400160405280600381526020017f74656c000000000000000000000000000000000000000000000000000000000081525081526020018460028151811061024457fe5b60200260200101518152508160018151811061025c57fe5b60200260200101819052506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166341ffd75f856000815181106102b457fe5b6020026020010151846040518363ffffffff1660e01b81526004016102da929190610d05565b602060405180830381600087803b1580156102f457600080fd5b505af1158015610308573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061032c9190610a02565b60030b90507f8e5890af40fc24a059396aca2f83d6ce41fcef086876548fa4fb8ec27e9d292a816040516103609190610cc8565b60405180910390a18092505050919050565b600060038251101561038357600080fd5b6060600267ffffffffffffffff8111801561039d57600080fd5b506040519080825280602002602001820160405280156103d157816020015b60608152602001906001900390816103bc5790505b5090506060836000815181106103e357fe5b60200260200101519050836001815181106103fa57fe5b60200260200101518260008151811061040f57fe5b60200260200101819052508360028151811061042757fe5b60200260200101518260018151811061043c57fe5b602002602001018190525061044f610786565b60405180604001604052808381526020018481525090506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635c6e105f836040518263ffffffff1660e01b81526004016104c39190610d88565b602060405180830381600087803b1580156104dd57600080fd5b505af11580156104f1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105159190610a02565b60030b90507fc57b01fa77f41df77eaab79a0e2623fab2e7ae3e9530d9b1cab225ad65f2b7ce816040516105499190610cc8565b60405180910390a180945050505050919050565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166380599e4b846040518263ffffffff1660e01b81526004016105bb9190610ce3565b602060405180830381600087803b1580156105d557600080fd5b505af11580156105e9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060","40525081019061060d9190610a02565b60030b90507f4b930e280fe29620bdff00c88155d46d6d82a39f45dd5c3ea114dc3157358112816040516106419190610cc8565b60405180910390a180915050919050565b606080606061065f610786565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fcd7e3c1866040518263ffffffff1660e01b81526004016106ba9190610ce3565b60006040518083038186803b1580156106d257600080fd5b505afa1580156106e6573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061070f9190610a6c565b90506060806002836020015151141561075957826020015160008151811061073357fe5b60200260200101519150826020015160018151811061074e57fe5b602002602001015190505b8682829550955095505050509193909250565b604051806040016040528060608152602001606081525090565b604051806040016040528060608152602001606081525090565b600082601f8301126107b157600080fd5b81356107c46107bf82610dd7565b610daa565b9150818183526020840193506020810190508360005b8381101561080a57813586016107f0888261089d565b8452602084019350602083019250506001810190506107da565b5050505092915050565b600082601f83011261082557600080fd5b815161083861083382610dd7565b610daa565b9150818183526020840193506020810190508360005b8381101561087e578151860161086488826108f1565b84526020840193506020830192505060018101905061084e565b5050505092915050565b60008151905061089781610f34565b92915050565b600082601f8301126108ae57600080fd5b81356108c16108bc82610dff565b610daa565b915080825260208301602083018583830111156108dd57600080fd5b6108e8838284610ee1565b50505092915050565b600082601f83011261090257600080fd5b815161091561091082610dff565b610daa565b9150808252602083016020830185838301111561093157600080fd5b61093c838284610ef0565b50505092915050565b60006040828403121561095757600080fd5b6109616040610daa565b9050600082015167ffffffffffffffff81111561097d57600080fd5b610989848285016108f1565b600083015250602082015167ffffffffffffffff8111156109a957600080fd5b6109b584828501610814565b60208301525092915050565b6000602082840312156109d357600080fd5b600082013567ffffffffffffffff8111156109ed57600080fd5b6109f9848285016107a0565b91505092915050565b600060208284031215610a1457600080fd5b6000610a2284828501610888565b91505092915050565b600060208284031215610a3d57600080fd5b600082013567ffffffffffffffff811115610a5757600080fd5b610a638482850161089d565b91505092915050565b600060208284031215610a7e57600080fd5b600082015167ffffffffffffffff811115610a9857600080fd5b610aa484828501610945565b91505092915050565b6000610ab98383610bce565b905092915050565b6000610acd8383610c84565b905092915050565b6000610ae082610e4b565b610aea8185610e86565b935083602082028501610afc85610e2b565b8060005b85811015610b385784840389528151610b198582610aad565b9450610b2483610e6c565b925060208a01995050600181019050610b00565b50829750879550505050505092915050565b6000610b5582610e56565b610b5f8185610e97565b935083602082028501610b7185610e3b565b8060005b85811015610bad5784840389528151610b8e8582610ac1565b9450610b9983610e79565b925060208a01995050600181019050610b75565b50829750879550505050505092915050565b610bc881610eca565b82525050565b6000610bd982610e61565b610be38185610ea8565b9350610bf3818560208601610ef0565b610bfc81610f23565b840191505092915050565b6000610c1282610e61565b610c1c8185610eb9565b9350610c2c818560208601610ef0565b610c3581610f23565b840191505092915050565b60006040830160008301518482036000860152610c5d8282610bce565b91505060208301518482036020860152610c778282610ad5565b9150508091505092915050565b60006040830160008301518482036000860152610ca18282610bce565b91505060208301518482036020860152610cbb8282610bce565b9150508091505092915050565b6000602082019050610cdd6000830184610bbf565b92915050565b60006020820190508181036000830152610cfd8184610c07565b905092915050565b60006040820190508181036000830152610d1f8185610c07565b90508181036020830152610d338184610b4a565b90509392505050565b60006060820190508181036000830152610d568186610c07565b90508181036020830152610d6a8185610c07565b90508181036040830152610d7e8184610c07565b9050949350505050565b60006020820190508181036000830152610da28184610c40565b905092915050565b6000604051905081810181811067ffffffffffffffff82111715610dcd57600080fd5b8060405250919050565b600067ffffffffffffffff821115610dee57600080fd5b602082029050602081019050919050565b600067ffffffffffffffff821115610e1657600080fd5b601f19601f8301169050602081019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b6000819050919050565b60008160030b9050919050565b82818337600083830152505050565b60005b83811015610f0e578082015181840152602081019050610ef3565b83811115610f1d576000848401525b50505050565b6000601f19601f8301169050919050565b610f3d81610ed4565b8114610f4857600080fd5b5056fea2646970667358221220dcf9097a8e5275672d1b3188c0d94719f4202d4c5bb9053c1e3420f343fa241864736f6c634300060a0033"};

    public static final String BINARY = org.fisco.bcos.sdk.v3.utils.StringUtils.joinAll("", BINARY_ARRAY);

    public static final String[] SM_BINARY_ARRAY = {"608060405260405180606001604052806040518060400160405280600481526020017f6e616d650000000000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600381526020017f616765000000000000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600381526020017f74656c00000000000000000000000000000000000000000000000000000000008152508152506000906003620000d092919062000479565b50348015620000de57600080fd5b506060600267ffffffffffffffff81118015620000fa57600080fd5b506040519080825280602002602001820160405280156200013057816020015b60608152602001906001900390816200011a5790505b5090506040518060400160405280600381526020017f6167650000000000000000000000000000000000000000000000000000000000815250816000815181106200017757fe5b60200260200101819052506040518060400160405280600381526020017f74656c000000000000000000000000000000000000000000000000000000000081525081600181518110620001c657fe5b6020026020010181905250620001db620004e0565b60405180604001604052806040518060400160405280600481526020017f6e616d6500000000000000000000000000000000000000000000000000000000815250815260200183815250905061100273ffffffffffffffffffffffffffffffffffffffff1663cadb64626040518060400160405280600c81526020017f706572736f6e5f6d756c74690000000000000000000000000000000000000000815250836040518363ffffffff1660e01b81526004016200029b92919062000873565b602060405180830381600087803b158015620002b657600080fd5b505af1158015620002cb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002f1919062000680565b50600061100273ffffffffffffffffffffffffffffffffffffffff166359a48b656040518060400160405280600c81526020017f706572736f6e5f6d756c746900000000000000000000000000000000000000008152506040518263ffffffff1660e01b81526004016200036691906200084f565b60206040518083038186803b1580156200037f57600080fd5b505afa15801562000394573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620003ba919062000654565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156200042f576040517fc703cb120000000000000000000000000000000000000000000000000000000081526004016200042690620008ae565b60405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050620009f2565b828054828255906000526020600020908101928215620004cd579160200282015b82811115620004cc578251829080519060200190620004bb929190620004fa565b50916020019190600101906200049a565b5b509050620004dc919062000581565b5090565b604051806040016040528060608152602001606081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200053d57805160ff19168380011785556200056e565b828001600101855582156200056e579182015b828111156200056d57825182559160200191906001019062000550565b5b5090506200057d9190620005b2565b5090565b620005af91905b80821115620005ab5760008181620005a19190620005da565b5060010162000588565b5090565b90565b620005d791905b80821115620005d3576000816000905550600101620005b9565b5090565b90565b50805460018160011615610100020316600290046000825580601f1062000602575062000623565b601f016020900490600052602060002090810190620006229190620005b2565b5b50565b6000815190506200063781620009be565b92915050565b6000815190506200064e81620009d8565b92915050565b6000602082840312156200066757600080fd5b6000620006778482850162000626565b91505092915050565b6000602082840312156200069357600080fd5b6000620006a3848285016200063d565b91505092915050565b6000620006ba838362000743565b905092915050565b6000620006cf82620008e0565b620006db818562000903565b935083602082028501620006ef85620008d0565b8060005b858110156200073157848403895281516200070f8582620006ac565b94506200071c83620008f6565b925060208a01995050600181019050620006f3565b50829750879550505050505092915050565b60006200075082620008eb565b6200075c818562000914565b93506200076e81856020860162000977565b6200077981620009ad565b840191505092915050565b60006200079182620008eb565b6200079d818562000925565b9350620007af81856020860162000977565b620007ba81620009ad565b840191505092915050565b6000620007d460138362000925565b91507f637265617465207461626c65206661696c6564000000000000000000000000006000830152602082019050919050565b6000604083016000830151848203600086015262000826828262000743565b91505060208301518482036020860152620008428282620006c2565b9150508091505092915050565b600060208201905081810360008301526200086b818462000784565b905092915050565b600060408201905081810360008301526200088f818562000784565b90508181036020830152620008a5818462000807565b90509392505050565b60006020820190508181036000830152620008c981620007c5565b9050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b6000620009438262000957565b9050919050565b60008160030b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60005b83811015620009975780820151818401526020810190506200097a565b83811115620009a7576000848401525b50505050565b6000601f19601f8301169050919050565b620009c98162000936565b8114620009d557600080fd5b50565b620009e3816200094a565b8114620009ef57600080fd5b50565b610f818062000a026000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80635b325d781461005157806386b733f914610083578063f7f3074f146100b3578063f96bd580146100e3575b600080fd5b61006b60048036038101906100669190610a2b565b610113565b60405161007a93929190610d3c565b60405180910390f35b61009d60048036038101906100989190610a2b565b61022d565b6040516100aa9190610cc8565b60405180910390f35b6100cd60048036038101906100c891906109c1565b610322565b6040516100da9190610cc8565b60405180910390f35b6100fd60048036038101906100f891906109c1565b610581565b60405161010a9190610cc8565b60405180910390f35b606080606061012061076c565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635b325d78866040518263ffffffff1660e01b815260040161017b9190610ce3565b60006040518083038186803b15801561019357600080fd5b505afa1580156101a7573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906101d09190610a6c565b90506060806002836020015151141561021a5782602001516000815181106101f457fe5b60200260200101519150826020015160018151811061020f57fe5b602002602001015190505b8682829550955095505050509193909250565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166386b733f9846040518263ffffffff1660e01b815260040161028b9190610ce3565b602060405180830381600087803b1580156102a557600080fd5b505af11580156102b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102dd9190610a02565b60030b90507fe7769b56c2afa8e40381956f76b91d9ec19c34c0a81791702fdcae68e35a7271816040516103119190610cc8565b60405180910390a180915050919050565b600060038251101561033357600080fd5b6060600267ffffffffffffffff8111801561034d57600080fd5b5060405190808252806020026020018201604052801561038757816020015b610374610786565b81526020019060019003908161036c5790505b50905060405180604001604052806040518060400160405280600381526020017f61676500000000000000000000000000000000000000000000000000000000008152508152602001846001815181106103dd57fe5b6020026020010151815250816000815181106103f557fe5b602002602001018190525060405180604001604052806040518060400160405280600381526020017f74656c000000000000000000000000000000000000000000000000000000000081525081526020018460028151811061045357fe5b60200260200101518152508160018151811061046b57fe5b60200260200101819052506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166301fa804c856000815181106104c357fe5b6020026020010151846040518363ffffffff1660e01b81526004016104e9929190610d05565b602060405180830381600087803b15801561050357600080fd5b505af1158015610517573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061053b9190610a02565b60030b90507fd72ab475a08df05fbd4f7f8cb4db1ad9dbdc26f54437fa6794acd97357779d2a8160405161056f9190610cc8565b60405180910390a18092505050919050565b600060038251101561059257600080fd5b6060600267ffffffffffffffff811180156105ac57600080fd5b506040519080825280602002602001820160405280156105e057816020015b60608152602001906001900390816105cb5790505b5090506060836000815181106105f257fe5b6020026020010151905083","60018151811061060957fe5b60200260200101518260008151811061061e57fe5b60200260200101819052508360028151811061063657fe5b60200260200101518260018151811061064b57fe5b602002602001018190525061065e61076c565b60405180604001604052808381526020018481525090506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634c8b9530836040518263ffffffff1660e01b81526004016106d29190610d88565b602060405180830381600087803b1580156106ec57600080fd5b505af1158015610700573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107249190610a02565b60030b90507fdfc533ec2b52797a1229dc2495dbd3f4948f7c4c982ec077ad9d80810ec5c1f9816040516107589190610cc8565b60405180910390a180945050505050919050565b604051806040016040528060608152602001606081525090565b604051806040016040528060608152602001606081525090565b600082601f8301126107b157600080fd5b81356107c46107bf82610dd7565b610daa565b9150818183526020840193506020810190508360005b8381101561080a57813586016107f0888261089d565b8452602084019350602083019250506001810190506107da565b5050505092915050565b600082601f83011261082557600080fd5b815161083861083382610dd7565b610daa565b9150818183526020840193506020810190508360005b8381101561087e578151860161086488826108f1565b84526020840193506020830192505060018101905061084e565b5050505092915050565b60008151905061089781610f34565b92915050565b600082601f8301126108ae57600080fd5b81356108c16108bc82610dff565b610daa565b915080825260208301602083018583830111156108dd57600080fd5b6108e8838284610ee1565b50505092915050565b600082601f83011261090257600080fd5b815161091561091082610dff565b610daa565b9150808252602083016020830185838301111561093157600080fd5b61093c838284610ef0565b50505092915050565b60006040828403121561095757600080fd5b6109616040610daa565b9050600082015167ffffffffffffffff81111561097d57600080fd5b610989848285016108f1565b600083015250602082015167ffffffffffffffff8111156109a957600080fd5b6109b584828501610814565b60208301525092915050565b6000602082840312156109d357600080fd5b600082013567ffffffffffffffff8111156109ed57600080fd5b6109f9848285016107a0565b91505092915050565b600060208284031215610a1457600080fd5b6000610a2284828501610888565b91505092915050565b600060208284031215610a3d57600080fd5b600082013567ffffffffffffffff811115610a5757600080fd5b610a638482850161089d565b91505092915050565b600060208284031215610a7e57600080fd5b600082015167ffffffffffffffff811115610a9857600080fd5b610aa484828501610945565b91505092915050565b6000610ab98383610bce565b905092915050565b6000610acd8383610c84565b905092915050565b6000610ae082610e4b565b610aea8185610e86565b935083602082028501610afc85610e2b565b8060005b85811015610b385784840389528151610b198582610aad565b9450610b2483610e6c565b925060208a01995050600181019050610b00565b50829750879550505050505092915050565b6000610b5582610e56565b610b5f8185610e97565b935083602082028501610b7185610e3b565b8060005b85811015610bad5784840389528151610b8e8582610ac1565b9450610b9983610e79565b925060208a01995050600181019050610b75565b50829750879550505050505092915050565b610bc881610eca565b82525050565b6000610bd982610e61565b610be38185610ea8565b9350610bf3818560208601610ef0565b610bfc81610f23565b840191505092915050565b6000610c1282610e61565b610c1c8185610eb9565b9350610c2c818560208601610ef0565b610c3581610f23565b840191505092915050565b60006040830160008301518482036000860152610c5d8282610bce565b91505060208301518482036020860152610c778282610ad5565b9150508091505092915050565b60006040830160008301518482036000860152610ca18282610bce565b91505060208301518482036020860152610cbb8282610bce565b9150508091505092915050565b6000602082019050610cdd6000830184610bbf565b92915050565b60006020820190508181036000830152610cfd8184610c07565b905092915050565b60006040820190508181036000830152610d1f8185610c07565b90508181036020830152610d338184610b4a565b90509392505050565b60006060820190508181036000830152610d568186610c07565b90508181036020830152610d6a8185610c07565b90508181036040830152610d7e8184610c07565b9050949350505050565b60006020820190508181036000830152610da28184610c40565b905092915050565b6000604051905081810181811067ffffffffffffffff82111715610dcd57600080fd5b8060405250919050565b600067ffffffffffffffff821115610dee57600080fd5b602082029050602081019050919050565b600067ffffffffffffffff821115610e1657600080fd5b601f19601f8301169050602081019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b6000819050919050565b60008160030b9050919050565b82818337600083830152505050565b60005b83811015610f0e578082015181840152602081019050610ef3565b83811115610f1d576000848401525b50505050565b6000601f19601f8301169050919050565b610f3d81610ed4565b8114610f4857600080fd5b5056fea2646970667358221220542374077976dfc40dad2870ea2dcbf572ffe2972d02891e2a03b4045634d1f864736f6c634300060a0033"};

    public static final String SM_BINARY = org.fisco.bcos.sdk.v3.utils.StringUtils.joinAll("", SM_BINARY_ARRAY);

    public static final String[] ABI_ARRAY = {"[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"count\",\"type\":\"int256\"}],\"name\":\"CreateResult\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"count\",\"type\":\"int256\"}],\"name\":\"InsertResult\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"count\",\"type\":\"int256\"}],\"name\":\"RemoveResult\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"count\",\"type\":\"int256\"}],\"name\":\"UpdateResult\",\"type\":\"event\"},{\"conflictFields\":[{\"kind\":0}],\"inputs\":[{\"internalType\":\"string[]\",\"name\":\"entity\",\"type\":\"string[]\"}],\"name\":\"insert\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"selector\":[574357641,4184593792],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"conflictFields\":[{\"kind\":0}],\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"remove\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"selector\":[2153356875,2260153337],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"conflictFields\":[{\"kind\":0}],\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"select\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"selector\":[4242006977,1530027384],\"stateMutability\":\"view\",\"type\":\"function\"},{\"conflictFields\":[{\"kind\":0}],\"inputs\":[{\"internalType\":\"string[]\",\"name\":\"entity\",\"type\":\"string[]\"}],\"name\":\"update\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"selector\":[198665691,4159899471],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]"};

    public static final String ABI = org.fisco.bcos.sdk.v3.utils.StringUtils.joinAll("", ABI_ARRAY);

    public static final String FUNC_INSERT = "insert";

    public static final String FUNC_REMOVE = "remove";

    public static final String FUNC_SELECT = "select";

    public static final String FUNC_UPDATE = "update";

    public static final Event CREATERESULT_EVENT = new Event("CreateResult", 
            Arrays.<TypeReference<?>>asList(new TypeReference<Int256>() {}));
    ;

    public static final Event INSERTRESULT_EVENT = new Event("InsertResult", 
            Arrays.<TypeReference<?>>asList(new TypeReference<Int256>() {}));
    ;

    public static final Event REMOVERESULT_EVENT = new Event("RemoveResult", 
            Arrays.<TypeReference<?>>asList(new TypeReference<Int256>() {}));
    ;

    public static final Event UPDATERESULT_EVENT = new Event("UpdateResult", 
            Arrays.<TypeReference<?>>asList(new TypeReference<Int256>() {}));
    ;

    protected TestCRUDMultiParameter(String contractAddress, Client client,
            CryptoKeyPair credential) {
        super(getBinary(client.getCryptoSuite()), contractAddress, client, credential);
    }

    public static String getBinary(CryptoSuite cryptoSuite) {
        return (cryptoSuite.getCryptoTypeConfig() == CryptoType.ECDSA_TYPE ? BINARY : SM_BINARY);
    }

    public static String getABI() {
        return ABI;
    }

    public List<CreateResultEventResponse> getCreateResultEvents(
            TransactionReceipt transactionReceipt) {
        List<EventValuesWithLog> valueList = extractEventParametersWithLog(CREATERESULT_EVENT, transactionReceipt);
        ArrayList<CreateResultEventResponse> responses = new ArrayList<CreateResultEventResponse>(valueList.size());
        for (EventValuesWithLog eventValues : valueList) {
            CreateResultEventResponse typedResponse = new CreateResultEventResponse();
            typedResponse.log = eventValues.getLog();
            typedResponse.count = (BigInteger) eventValues.getNonIndexedValues().get(0).getValue();
            responses.add(typedResponse);
        }
        return responses;
    }

    public List<InsertResultEventResponse> getInsertResultEvents(
            TransactionReceipt transactionReceipt) {
        List<EventValuesWithLog> valueList = extractEventParametersWithLog(INSERTRESULT_EVENT, transactionReceipt);
        ArrayList<InsertResultEventResponse> responses = new ArrayList<InsertResultEventResponse>(valueList.size());
        for (EventValuesWithLog eventValues : valueList) {
            InsertResultEventResponse typedResponse = new InsertResultEventResponse();
            typedResponse.log = eventValues.getLog();
            typedResponse.count = (BigInteger) eventValues.getNonIndexedValues().get(0).getValue();
            responses.add(typedResponse);
        }
        return responses;
    }

    public List<RemoveResultEventResponse> getRemoveResultEvents(
            TransactionReceipt transactionReceipt) {
        List<EventValuesWithLog> valueList = extractEventParametersWithLog(REMOVERESULT_EVENT, transactionReceipt);
        ArrayList<RemoveResultEventResponse> responses = new ArrayList<RemoveResultEventResponse>(valueList.size());
        for (EventValuesWithLog eventValues : valueList) {
            RemoveResultEventResponse typedResponse = new RemoveResultEventResponse();
            typedResponse.log = eventValues.getLog();
            typedResponse.count = (BigInteger) eventValues.getNonIndexedValues().get(0).getValue();
            responses.add(typedResponse);
        }
        return responses;
    }

    public List<UpdateResultEventResponse> getUpdateResultEvents(
            TransactionReceipt transactionReceipt) {
        List<EventValuesWithLog> valueList = extractEventParametersWithLog(UPDATERESULT_EVENT, transactionReceipt);
        ArrayList<UpdateResultEventResponse> responses = new ArrayList<UpdateResultEventResponse>(valueList.size());
        for (EventValuesWithLog eventValues : valueList) {
            UpdateResultEventResponse typedResponse = new UpdateResultEventResponse();
            typedResponse.log = eventValues.getLog();
            typedResponse.count = (BigInteger) eventValues.getNonIndexedValues().get(0).getValue();
            responses.add(typedResponse);
        }
        return responses;
    }

    public TransactionReceipt insert(List<String> entity) {
        final Function function = new Function(
                FUNC_INSERT, 
                Arrays.<Type>asList(new DynamicArray<Utf8String>(
                        Utf8String.class,
                        org.fisco.bcos.sdk.v3.codec.Utils.typeMap(entity, Utf8String.class))),
                Collections.<TypeReference<?>>emptyList(), 0);
        return executeTransaction(function);
    }

    public String insert(List<String> entity, TransactionCallback callback) {
        final Function function = new Function(
                FUNC_INSERT, 
                Arrays.<Type>asList(new DynamicArray<Utf8String>(
                        Utf8String.class,
                        org.fisco.bcos.sdk.v3.codec.Utils.typeMap(entity, Utf8String.class))),
                Collections.<TypeReference<?>>emptyList(), 0);
        return asyncExecuteTransaction(function, callback);
    }

    public String getSignedTransactionForInsert(List<String> entity) {
        final Function function = new Function(
                FUNC_INSERT, 
                Arrays.<Type>asList(new DynamicArray<Utf8String>(
                        Utf8String.class,
                        org.fisco.bcos.sdk.v3.codec.Utils.typeMap(entity, Utf8String.class))),
                Collections.<TypeReference<?>>emptyList(), 0);
        return createSignedTransaction(function);
    }

    public Tuple1<List<String>> getInsertInput(TransactionReceipt transactionReceipt) {
        String data = transactionReceipt.getInput().substring(10);
        final Function function = new Function(FUNC_INSERT, 
                Arrays.<Type>asList(), 
                Arrays.<TypeReference<?>>asList(new TypeReference<DynamicArray<Utf8String>>() {}));
        List<Type> results = this.functionReturnDecoder.decode(data, function.getOutputParameters());
        return new Tuple1<List<String>>(

                convertToNative((List<Utf8String>) results.get(0).getValue())
                );
    }

    public Tuple1<BigInteger> getInsertOutput(TransactionReceipt transactionReceipt) {
        String data = transactionReceipt.getOutput();
        final Function function = new Function(FUNC_INSERT, 
                Arrays.<Type>asList(), 
                Arrays.<TypeReference<?>>asList(new TypeReference<Int256>() {}));
        List<Type> results = this.functionReturnDecoder.decode(data, function.getOutputParameters());
        return new Tuple1<BigInteger>(

                (BigInteger) results.get(0).getValue()
                );
    }

    public TransactionReceipt remove(String name) {
        final Function function = new Function(
                FUNC_REMOVE, 
                Arrays.<Type>asList(new Utf8String(name)),
                Collections.<TypeReference<?>>emptyList(), 0);
        return executeTransaction(function);
    }

    public String remove(String name, TransactionCallback callback) {
        final Function function = new Function(
                FUNC_REMOVE, 
                Arrays.<Type>asList(new Utf8String(name)),
                Collections.<TypeReference<?>>emptyList(), 0);
        return asyncExecuteTransaction(function, callback);
    }

    public String getSignedTransactionForRemove(String name) {
        final Function function = new Function(
                FUNC_REMOVE, 
                Arrays.<Type>asList(new Utf8String(name)),
                Collections.<TypeReference<?>>emptyList(), 0);
        return createSignedTransaction(function);
    }

    public Tuple1<String> getRemoveInput(TransactionReceipt transactionReceipt) {
        String data = transactionReceipt.getInput().substring(10);
        final Function function = new Function(FUNC_REMOVE, 
                Arrays.<Type>asList(), 
                Arrays.<TypeReference<?>>asList(new TypeReference<Utf8String>() {}));
        List<Type> results = this.functionReturnDecoder.decode(data, function.getOutputParameters());
        return new Tuple1<String>(

                (String) results.get(0).getValue()
                );
    }

    public Tuple1<BigInteger> getRemoveOutput(TransactionReceipt transactionReceipt) {
        String data = transactionReceipt.getOutput();
        final Function function = new Function(FUNC_REMOVE, 
                Arrays.<Type>asList(), 
                Arrays.<TypeReference<?>>asList(new TypeReference<Int256>() {}));
        List<Type> results = this.functionReturnDecoder.decode(data, function.getOutputParameters());
        return new Tuple1<BigInteger>(

                (BigInteger) results.get(0).getValue()
                );
    }

    public Tuple3<String, String, String> select(String name) throws ContractException {
        final Function function = new Function(FUNC_SELECT, 
                Arrays.<Type>asList(new Utf8String(name)),
                Arrays.<TypeReference<?>>asList(new TypeReference<Utf8String>() {}, new TypeReference<Utf8String>() {}, new TypeReference<Utf8String>() {}));
        List<Type> results = executeCallWithMultipleValueReturn(function);
        return new Tuple3<String, String, String>(
                (String) results.get(0).getValue(), 
                (String) results.get(1).getValue(), 
                (String) results.get(2).getValue());
    }

    public TransactionReceipt update(List<String> entity) {
        final Function function = new Function(
                FUNC_UPDATE, 
                Arrays.<Type>asList(new DynamicArray<Utf8String>(
                        Utf8String.class,
                        org.fisco.bcos.sdk.v3.codec.Utils.typeMap(entity, Utf8String.class))),
                Collections.<TypeReference<?>>emptyList(), 0);
        return executeTransaction(function);
    }

    public String update(List<String> entity, TransactionCallback callback) {
        final Function function = new Function(
                FUNC_UPDATE, 
                Arrays.<Type>asList(new DynamicArray<Utf8String>(
                        Utf8String.class,
                        org.fisco.bcos.sdk.v3.codec.Utils.typeMap(entity, Utf8String.class))),
                Collections.<TypeReference<?>>emptyList(), 0);
        return asyncExecuteTransaction(function, callback);
    }

    public String getSignedTransactionForUpdate(List<String> entity) {
        final Function function = new Function(
                FUNC_UPDATE, 
                Arrays.<Type>asList(new DynamicArray<Utf8String>(
                        Utf8String.class,
                        org.fisco.bcos.sdk.v3.codec.Utils.typeMap(entity, Utf8String.class))),
                Collections.<TypeReference<?>>emptyList(), 0);
        return createSignedTransaction(function);
    }

    public Tuple1<List<String>> getUpdateInput(TransactionReceipt transactionReceipt) {
        String data = transactionReceipt.getInput().substring(10);
        final Function function = new Function(FUNC_UPDATE, 
                Arrays.<Type>asList(), 
                Arrays.<TypeReference<?>>asList(new TypeReference<DynamicArray<Utf8String>>() {}));
        List<Type> results = this.functionReturnDecoder.decode(data, function.getOutputParameters());
        return new Tuple1<List<String>>(

                convertToNative((List<Utf8String>) results.get(0).getValue())
                );
    }

    public Tuple1<BigInteger> getUpdateOutput(TransactionReceipt transactionReceipt) {
        String data = transactionReceipt.getOutput();
        final Function function = new Function(FUNC_UPDATE, 
                Arrays.<Type>asList(), 
                Arrays.<TypeReference<?>>asList(new TypeReference<Int256>() {}));
        List<Type> results = this.functionReturnDecoder.decode(data, function.getOutputParameters());
        return new Tuple1<BigInteger>(

                (BigInteger) results.get(0).getValue()
                );
    }

    public static TestCRUDMultiParameter load(String contractAddress, Client client,
            CryptoKeyPair credential) {
        return new TestCRUDMultiParameter(contractAddress, client, credential);
    }

    public static TestCRUDMultiParameter deploy(Client client, CryptoKeyPair credential) throws
            ContractException {
        return deploy(TestCRUDMultiParameter.class, client, credential, getBinary(client.getCryptoSuite()), getABI(), null, null);
    }

    public static class CreateResultEventResponse {
        public TransactionReceipt.Logs log;

        public BigInteger count;
    }

    public static class InsertResultEventResponse {
        public TransactionReceipt.Logs log;

        public BigInteger count;
    }

    public static class RemoveResultEventResponse {
        public TransactionReceipt.Logs log;

        public BigInteger count;
    }

    public static class UpdateResultEventResponse {
        public TransactionReceipt.Logs log;

        public BigInteger count;
    }

    @Override
    public String toString() {
        return "TestCRUDMultiParameter{" +
                "contractAddress='" + contractAddress + '\'' +
                '}';
    }
}
